#ifndef _GAME_H
#define _GAME_H

#include "Iw2D.h"
#include "s3eKeyboard.h"
#include "s3ePointer.h"

#include "ufo.h"
#include "planet.h"
#include "fuel.h"
#include "shield.h"
#include "speed.h"
#include "comet.h"
#include "boundingbox.h"
#include "boundingtriangle.h"

class Game
{
public:
    Game();
	~Game();
	void Reset();
	void SetupImages();
	void CleanupImages();
    void Render();
    void Update(int deltaTimeMs);

private:
	int i;
	int fuelCount;
	int score;
	CIw2DImage* backgroundSprite;
	UFO* ufo;
	Planet* planets [7];
	Fuel* fuels[3];
	Comet* comets[2];
	Shield* shield;
	Speed* speed;
	BoundingBox middleBox;
	BoundingTriangle topTriangle, bottomTriangle;

	void UpdateInput(int deltaTimeMs);
	void CheckFuelCollision();
	void CheckShieldCollision();
	void CheckSpeedCollision();
	void CheckCometCollision();
	void SpawnFuelInPlayArea(Fuel* fuel);
	void SpawnShieldInPlayArea();
	void SpawnSpeedInPlayArea();
};

#endif